<h1>alle Kunden</h1>
<table>
	<tr>
		<th>Vorname</th>
		<th>Nachname</th>
		<th>Firmenname</th>
		<th>Email</th>
		<th>Ort</th>
		<th>PLZ</th>
		<th>Strasse</th>
		<th></th>
		<th></th>
	</tr>
	<% @customers.each do |c| %>
	<% @addresses = c.addresses %>
	<% @addresses.each do |a| %>
	<tr>
		<!-- 	customer -->
		<td><%= c.firstname %></td>
		<td><%= c.lastname %></td>
		<td><%= c.companyname %></td>
		<td><%= c.email %></td>
		<!-- 	address -->
		<td><%= a.city %></td>
		<td><%= a.plz %></td>
		<td><%= a.street %></td>
		<td><%= link_to 'Details', c %></td>
		<!-- 		<%#puts "################## #{c.id}"%> -->
		<td><%= link_to 'Rechnungen', show_customer_invoice_path(:id => c.id) %></td>
	</tr>
	<% end %>
	<% end %>
</table>
<br />
<%= link_to 'neuen Kunden anlegen', new_customer_path() %>
<%= link_to 'Zurueck', home_index_path() %>
<script></script>
